package org.example.common;

import org.example.pojo.Notice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import top.javatool.canal.client.annotation.CanalTable;
import top.javatool.canal.client.handler.EntryHandler;

@Component
@CanalTable("tb_notice")
public class NoticeHandler implements EntryHandler<Notice> {

    //@Autowired
    //private RedisTemplate redisTemplate;

    @Override
    public void insert(Notice notice) {
        System.out.println("insert:"+notice);
    }

    @Override
    public void update(Notice before, Notice after) {
        System.out.println("update.before:"+before);
        System.out.println("update.after:"+after);
    }

    @Override
    public void delete(Notice notice) {
        System.out.println("delete:"+notice);
    }
}
